package com.example.bootuserserviceconsumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.atguigu.bean.UserAddress;
import com.example.bootuserserviceconsumer.service.impl.OrderServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * Title: OrderController
 * Description: TODO
 *
 * @author gejx
 * @version V1.0
 * @date 2021-12-22
 */
@Controller
public class OrderController {
    @Resource
    private OrderServiceImpl orderService;
    @ResponseBody
    @RequestMapping("/initOrder")
    public List<UserAddress> orderController(@RequestParam("Uid") String userId){
     return orderService.initOrder(userId);
    }
}
